-- GENERATED SPELL FOR [Spectral Teacher] --


function spell0_10500(pUnit, Event) --@Arcane Focus,n/a--
pUnit:FullCastSpellOnTarget(17633,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10500', 30261, 1)
end

function spell1_10500(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(8994,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10500', 16000, 1)
end

function spell2_10500(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(17630,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10500', 591, 1)
end

function Sorts_10500(pUnit, Event)
local choix_sorts_10500 = math.random(0, 2)
if choix_sorts_10500 == 0 then
pUnit:RegisterEvent('spell0_10500', 1, 1)
end
if choix_sorts_10500 == 1 then
pUnit:RegisterEvent('spell1_10500', 1, 1)
end
if choix_sorts_10500 == 2 then
pUnit:RegisterEvent('spell2_10500', 1, 1)
end
end

function mob10500_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10500', math.random(1500, 3000), 1)
end

function mob10500_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10500_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10500_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10500, 1, 'mob10500_Action')
RegisterUnitEvent(10500, 2, 'mob10500_Leave')
RegisterUnitEvent(10500, 3, 'mob10500_Kill')
RegisterUnitEvent(10500, 4, 'mob10500_Die')
